package com.hzw.code.util;

import cn.hutool.core.lang.WeightRandom;
import cn.hutool.core.lang.WeightRandom.WeightObj;
import cn.hutool.core.util.RandomUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * 按权重随机获得民族
 */
public class WeightRandomMz {
    public static final List<WeightRandom.WeightObj<String>> weightList = new ArrayList<WeightRandom.WeightObj<String>>();
    static {
        WeightRandom.WeightObj<String> a1 = new WeightObj<String>("高山", 1);
        WeightRandom.WeightObj<String> a2 = new WeightObj<String>("黎", 1);
        WeightRandom.WeightObj<String> a3 = new WeightObj<String>("京", 1);
        WeightRandom.WeightObj<String> a4 = new WeightObj<String>("仫佬", 1);
        WeightRandom.WeightObj<String> a5 = new WeightObj<String>("壮", 1);
        WeightRandom.WeightObj<String> a6 = new WeightObj<String>("水", 1);
        WeightRandom.WeightObj<String> a7 = new WeightObj<String>("布依", 1);
        WeightRandom.WeightObj<String> a8 = new WeightObj<String>("基诺", 1);
        WeightRandom.WeightObj<String> a9 = new WeightObj<String>("德昂", 1);
        WeightRandom.WeightObj<String> a10 = new WeightObj<String>("普米", 1);
        WeightRandom.WeightObj<String> a11 = new WeightObj<String>("布朗", 1);
        WeightRandom.WeightObj<String> a12 = new WeightObj<String>("纳西", 1);
        WeightRandom.WeightObj<String> a13 = new WeightObj<String>("佤", 1);
        WeightRandom.WeightObj<String> a14 = new WeightObj<String>("傣", 1);
        WeightRandom.WeightObj<String> a15 = new WeightObj<String>("白", 1);
        WeightRandom.WeightObj<String> a16 = new WeightObj<String>("羌", 1);
        WeightRandom.WeightObj<String> a17 = new WeightObj<String>("门巴", 1);
        WeightRandom.WeightObj<String> a18 = new WeightObj<String>("塔塔尔", 1);
        WeightRandom.WeightObj<String> a19 = new WeightObj<String>("乌孜别克", 1);
        WeightRandom.WeightObj<String> a20 = new WeightObj<String>("锡伯", 1);
        WeightRandom.WeightObj<String> a21 = new WeightObj<String>("哈萨克", 1);
        WeightRandom.WeightObj<String> a22 = new WeightObj<String>("裕固", 1);
        WeightRandom.WeightObj<String> a23 = new WeightObj<String>("撒拉", 1);
        WeightRandom.WeightObj<String> a24 = new WeightObj<String>("东乡", 1);
        WeightRandom.WeightObj<String> a25 = new WeightObj<String>("鄂伦春", 1);
        WeightRandom.WeightObj<String> a26 = new WeightObj<String>("达斡尔", 1);
        WeightRandom.WeightObj<String> a27 = new WeightObj<String>("朝鲜", 1);
        WeightRandom.WeightObj<String> a28 = new WeightObj<String>("蒙古", 1);
        WeightRandom.WeightObj<String> a29 = new WeightObj<String>("畲", 1);
        WeightRandom.WeightObj<String> a30 = new WeightObj<String>("土家", 1);
        WeightRandom.WeightObj<String> a31 = new WeightObj<String>("毛南", 1);
        WeightRandom.WeightObj<String> a32 = new WeightObj<String>("瑶", 1);
        WeightRandom.WeightObj<String> a33 = new WeightObj<String>("仡佬", 1);
        WeightRandom.WeightObj<String> a34 = new WeightObj<String>("侗", 1);
        WeightRandom.WeightObj<String> a35 = new WeightObj<String>("苗", 1);
        WeightRandom.WeightObj<String> a36 = new WeightObj<String>("独龙", 1);
        WeightRandom.WeightObj<String> a37 = new WeightObj<String>("怒", 1);
        WeightRandom.WeightObj<String> a38 = new WeightObj<String>("阿昌", 1);
        WeightRandom.WeightObj<String> a39 = new WeightObj<String>("景颇", 1);
        WeightRandom.WeightObj<String> a40 = new WeightObj<String>("拉祜", 1);
        WeightRandom.WeightObj<String> a41 = new WeightObj<String>("僳僳", 1);
        WeightRandom.WeightObj<String> a42 = new WeightObj<String>("哈尼", 1);
        WeightRandom.WeightObj<String> a43 = new WeightObj<String>("彝", 1);
        WeightRandom.WeightObj<String> a44 = new WeightObj<String>("珞巴", 1);
        WeightRandom.WeightObj<String> a45 = new WeightObj<String>("藏", 1);
        WeightRandom.WeightObj<String> a46 = new WeightObj<String>("俄罗斯", 1);
        WeightRandom.WeightObj<String> a47 = new WeightObj<String>("塔吉克", 1);
        WeightRandom.WeightObj<String> a48 = new WeightObj<String>("柯尔克孜", 1);
        WeightRandom.WeightObj<String> a49 = new WeightObj<String>("维吾尔", 1);
        WeightRandom.WeightObj<String> a50 = new WeightObj<String>("保安", 1);
        WeightRandom.WeightObj<String> a51 = new WeightObj<String>("土", 2);
        WeightRandom.WeightObj<String> a52 = new WeightObj<String>("回", 3);
        WeightRandom.WeightObj<String> a53 = new WeightObj<String>("鄂温克", 4);
        WeightRandom.WeightObj<String> a54 = new WeightObj<String>("赫哲", 2);
        WeightRandom.WeightObj<String> a55 = new WeightObj<String>("满", 3);
        WeightRandom.WeightObj<String> a56 = new WeightObj<String>("汉", 20);

        weightList.add(a1);
        weightList.add(a2);
        weightList.add(a3);
        weightList.add(a4);
        weightList.add(a5);
        weightList.add(a6);
        weightList.add(a7);
        weightList.add(a8);
        weightList.add(a9);
        weightList.add(a10);
        weightList.add(a11);
        weightList.add(a12);
        weightList.add(a13);
        weightList.add(a14);
        weightList.add(a15);
        weightList.add(a16);
        weightList.add(a17);
        weightList.add(a18);
        weightList.add(a19);
        weightList.add(a20);
        weightList.add(a21);
        weightList.add(a22);
        weightList.add(a23);
        weightList.add(a24);
        weightList.add(a25);
        weightList.add(a26);
        weightList.add(a27);
        weightList.add(a28);
        weightList.add(a29);
        weightList.add(a30);
        weightList.add(a31);
        weightList.add(a32);
        weightList.add(a33);
        weightList.add(a34);
        weightList.add(a35);
        weightList.add(a36);
        weightList.add(a37);
        weightList.add(a38);
        weightList.add(a39);
        weightList.add(a40);
        weightList.add(a41);
        weightList.add(a42);
        weightList.add(a43);
        weightList.add(a44);
        weightList.add(a45);
        weightList.add(a46);
        weightList.add(a47);
        weightList.add(a48);
        weightList.add(a49);
        weightList.add(a50);
        weightList.add(a51);
        weightList.add(a52);
        weightList.add(a53);
        weightList.add(a54);
        weightList.add(a55);
        weightList.add(a56);
    }

    public static String getMz(){
        WeightRandom wr = RandomUtil.weightRandom(weightList);
        return wr.next().toString();
    }

}
